package com.tzinfo.tzt.activity;

import android.graphics.Bitmap;
import android.os.Bundle;
import android.widget.Toast;

import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.tzinfo.tzt.R;
import com.tzinfo.tzt.view.gestureimage.GestureImageView;

public class HouseViewIamge extends BaseActivity {
	private String url = null;
	private GestureImageView imageView;
	private ImageLoader imageLoader = ImageLoader.getInstance();
	private DisplayImageOptions options;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_view_image);
		url = getIntent().getStringExtra("url");
		Toast.makeText(this, url, 4000).show();
		options = new DisplayImageOptions.Builder()
				.showImageOnLoading(R.drawable.ic_stub)
				.showImageForEmptyUri(R.drawable.ic_empty)
				.showImageOnFail(R.drawable.ic_error).cacheInMemory(true)
				.cacheOnDisc(true).bitmapConfig(Bitmap.Config.RGB_565).build();
		imageView = (GestureImageView) this.findViewById(R.id.image);
		imageLoader.displayImage(url, imageView, options);
	}
}